home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'qrprntr.pas' rev: 3.00
-
- #ifndef qrprntrHPP
- #define qrprntrHPP
- #include <Dialogs.hpp>
- #include <qr2const.hpp>
- #include <DBTables.hpp>
- #include <Db.hpp>
- #include <Forms.hpp>
- #include <Graphics.hpp>
- #include <Printers.hpp>
- #include <Buttons.hpp>
- #include <ComCtrls.hpp>
- #include <ExtCtrls.hpp>
- #include <StdCtrls.hpp>
- #include <Controls.hpp>
- #include <Classes.hpp>
- #include <Messages.hpp>
- #include <SysUtils.hpp>
- #include <WinSpool.hpp>
- #include <Windows.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Qrprntr
- {
- //-- type declarations -------------------------------------------------------
- enum TQRPaperSize { Default, Letter, LetterSmall, Tabloid, Ledger, Legal, Statement, Executive, A3,
- A4, A4Small, A5, B4, B5, Folio, Quarto, qr10X14, qr11X17, Note, Env9, Env10, Env11, Env12, Env14, CSheet,
- DSheet, ESheet, Custom };
-
- enum TQRBin { First, Upper, Lower, Middle, Manual, Envelope, EnvManual, Auto, Tractor, SmallFormat,
- LargeFormat, LargeCapacity, Cassette, Last };
-
- enum TQRBandType { rbTitle, rbPageHeader, rbDetail, rbPageFooter, rbSummary, rbGroupHeader, rbGroupFooter,
- rbSubDetail, rbColumnHeader, rbOverlay, rbChild };
-
- class DELPHICLASS EQRError;
- class PASCALIMPLEMENTATION EQRError : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EQRError(const System::AnsiString Msg) : Sysutils::Exception(Msg)
- { }
- /* Exception.CreateFmt */ __fastcall EQRError(const System::AnsiString Msg, const System::TVarRec *
- Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EQRError(int Ident, Extended Dummy) : Sysutils::Exception(Ident
- , Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EQRError(int Ident, const System::TVarRec * Args, const int
- Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EQRError(const System::AnsiString Msg, int AHelpContext) : Sysutils::
- Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EQRError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EQRError(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EQRError(int Ident, const System::TVarRec * Args, const
- int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EQRError(void) { }
-
- };
-
- typedef Word CodeType;
-
- typedef Byte UpIndex;
-
- typedef Word DownIndex;
-
- typedef DownIndex TreeDownArray[256];
-
- typedef UpIndex TreeUpArray[513];
-
- class DELPHICLASS TQRPrinter;
- class DELPHICLASS TPrinterSettings;
- typedef bool TPaperSizesSupported[27];
-
- class PASCALIMPLEMENTATION TPrinterSettings : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- char *FDevice;
- char *FDriver;
- char *FPort;
- int DeviceMode;
- _devicemodeA *DevMode;
- int FCopies;
- bool FDuplex;
- int FMaxExtentX;
- int FMaxExtentY;
- int FMinExtentX;
- int FMinExtentY;
- TPrinterOrientation FOrientation;
- TQRBin FOutputBin;
- TQRPaperSize FPaperSize;
- bool FPaperSizes[27];
- int FPaperWidth;
- int FPaperLength;
- int FPixelsPerX;
- int FPixelsPerY;
- int FTopOffset;
- int FLeftOffset;
- Printers::TPrinter* FPrinter;
- System::AnsiString FTitle;
- int __fastcall GetCopies(void);
- System::AnsiString __fastcall GetDriver(void);
- bool __fastcall GetDuplex(void);
- int __fastcall GetMaxExtentX(void);
- int __fastcall GetMaxExtentY(void);
- int __fastcall GetMinExtentX(void);
- int __fastcall GetMinExtentY(void);
- Printers::TPrinterOrientation __fastcall GetOrientation(void);
- TQRBin __fastcall GetOutputBin(void);
- TQRPaperSize __fastcall GetPaperSize(void);
- bool __fastcall GetPaperSizeSupported(TQRPaperSize PaperSize);
- int __fastcall GetPaperWidth(void);
- int __fastcall GetPaperLength(void);
- int __fastcall GetPixelsPerX(void);
- int __fastcall GetPixelsPerY(void);
- System::AnsiString __fastcall GetPort(void);
- Printers::TPrinter* __fastcall GetPrinter(void);
- System::AnsiString __fastcall GetTitle(void);
- int __fastcall GetTopOffset(void);
- int __fastcall GetLeftOffset(void);
- bool __fastcall Supported(int Setting);
- void __fastcall SetField(int aField);
- void __fastcall GetPrinterSettings(void);
- void __fastcall SetCopies(int Value);
- void __fastcall SetDuplex(bool Value);
- void __fastcall SetOrientation(Printers::TPrinterOrientation Value);
- void __fastcall SetOutputBin(TQRBin Value);
- void __fastcall SetPaperSize(TQRPaperSize Value);
- void __fastcall SetPaperLength(int Value);
- void __fastcall SetPaperWidth(int Value);
- void __fastcall SetPrinter(Printers::TPrinter* Value);
- void __fastcall SetTitle(System::AnsiString Value);
-
- public:
- __fastcall TPrinterSettings(void);
- __fastcall virtual ~TPrinterSettings(void);
- void __fastcall ApplySettings(void);
- __property System::AnsiString Device = {read=GetDriver};
- __property System::AnsiString Driver = {read=GetDriver};
- __property int LeftOffset = {read=GetLeftOffset, nodefault};
- __property int MaxExtentX = {read=GetMaxExtentX, nodefault};
- __property int MaxExtentY = {read=GetMaxExtentY, nodefault};
- __property int MinExtentX = {read=GetMinExtentX, nodefault};
- __property int MinExtentY = {read=GetMinExtentY, nodefault};
- __property bool PaperSizeSupported[TQRPaperSize PaperSize] = {read=GetPaperSizeSupported};
- __property int PixelsPerX = {read=GetPixelsPerX, nodefault};
- __property int PixelsPerY = {read=GetPixelsPerY, nodefault};
- __property System::AnsiString Port = {read=GetPort};
- __property int TopOffset = {read=GetTopOffset, nodefault};
- __property int Copies = {read=GetCopies, write=SetCopies, nodefault};
- __property bool Duplex = {read=GetDuplex, write=SetDuplex, nodefault};
- __property Printers::TPrinterOrientation Orientation = {read=GetOrientation, write=SetOrientation,
- nodefault};
- __property TQRBin OutputBin = {read=GetOutputBin, write=SetOutputBin, nodefault};
- __property int PaperLength = {read=GetPaperLength, write=SetPaperLength, nodefault};
- __property TQRPaperSize PaperSize = {read=GetPaperSize, write=SetPaperSize, nodefault};
- __property int PaperWidth = {read=GetPaperWidth, write=SetPaperWidth, nodefault};
- __property Printers::TPrinter* Printer = {read=GetPrinter, write=SetPrinter};
- __property System::AnsiString Title = {read=GetTitle, write=SetTitle};
- };
-
- class DELPHICLASS TQRStream;
- class PASCALIMPLEMENTATION TQRStream : public Classes::TStream
- {
- typedef Classes::TStream inherited;
-
- private:
- _RTL_CRITICAL_SECTION FLock;
- Classes::TMemoryStream* MemoryStream;
- System::AnsiString FFilename;
- Classes::TFileStream* FileStream;
- bool FInMemory;
- int FMemoryLimit;
-
- public:
- __fastcall TQRStream(int MemoryLimit);
- __fastcall TQRStream(System::AnsiString Filename);
- __fastcall virtual ~TQRStream(void);
- virtual int __fastcall Write(const void *Buffer, int Count);
- virtual int __fastcall Seek(int Offset, Word Origin);
- virtual int __fastcall Read(void *Buffer, int Count);
- void __fastcall LockStream(void);
- void __fastcall UnlockStream(void);
- void __fastcall SaveToStream(Classes::TStream* AStream);
- __property bool InMemory = {read=FInMemory, nodefault};
- };
-
- typedef void __fastcall (__closure *TQRAfterPrintEvent)(System::TObject* Sender);
-
- typedef void __fastcall (__closure *TQRAfterPreviewEvent)(System::TObject* Sender);
-
- enum TQRPrinterDestination { qrdMetafile, qrdPrinter };
-
- typedef void __fastcall (__closure *TQRGenerateToPrinterEvent)(void);
-
- class DELPHICLASS TQRExportFilter;
- typedef void __fastcall (__closure *TQRExportToFilterEvent)(TQRExportFilter* aFilter);
-
- typedef void __fastcall (__closure *TQRPrintSetupEvent)(void);
-
- enum TQRPrinterStatus { mpReady, mpBusy, mpFinished };
-
- class DELPHICLASS TQRPageList;
- class DELPHICLASS TQRCompress;
- class PASCALIMPLEMENTATION TQRCompress : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- Byte BitPos;
- bool CompressFlag;
- CodeType InByte;
- DownIndex Left[256];
- DownIndex Right[256];
- CodeType OutByte;
- Classes::TStream* Stream;
- UpIndex Up[513];
- Byte __fastcall GetByte(void);
- void __fastcall InitializeSplay(void);
- void __fastcall Splay(CodeType Plain);
-
- public:
- __fastcall TQRCompress(Classes::TStream* aStream, bool CompressData);
- __fastcall virtual ~TQRCompress(void);
- void __fastcall Expand(Byte &Expanded);
- void __fastcall Compress(CodeType Plain);
- };
-
- class PASCALIMPLEMENTATION TQRPageList : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- _RTL_CRITICAL_SECTION FLock;
- TQRCompress* aCompressor;
- bool FCompression;
- int FPageCount;
- TQRStream* FStream;
- void __fastcall SeekToFirst(void);
- void __fastcall SeekToLast(void);
- void __fastcall SeekToPage(int PageNumber);
- void __fastcall ReadFileHeader(void);
- void __fastcall WriteFileHeader(void);
-
- public:
- __fastcall TQRPageList(void);
- __fastcall virtual ~TQRPageList(void);
- Graphics::TMetafile* __fastcall GetPage(int PageNumber);
- void __fastcall AddPage(Graphics::TMetafile* aMetafile);
- void __fastcall Clear(void);
- void __fastcall Finish(void);
- void __fastcall LoadFromFile(System::AnsiString Filename);
- void __fastcall LockList(void);
- void __fastcall SaveToFile(System::AnsiString Filename);
- void __fastcall UnlockList(void);
- __property bool Compression = {read=FCompression, write=FCompression, nodefault};
- __property int PageCount = {read=FPageCount, nodefault};
- __property TQRStream* Stream = {read=FStream, write=FStream};
- };
-
- class PASCALIMPLEMENTATION TQRPrinter : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- private:
- Printers::TPrinter* aPrinter;
- TPrinterSettings* aPrinterSettings;
- TQRStream* aStream;
- TQRAfterPrintEvent FAfterPrintEvent;
- TQRAfterPreviewEvent FAfterPreviewEvent;
- int FAvailablePages;
- bool FCancelled;
- Graphics::TCanvas* FCanvas;
- TQRPrinterDestination FDestination;
- int FFirstPage;
- int FLastpage;
- int FLeftWaste;
- Controls::TWinControl* FMessageReceiver;
- Graphics::TMetafile* FMetafile;
- TQRGenerateToPrinterEvent FOnGenerateToPrinterEvent;
- TQRExportToFilterEvent FOnExportToFilterEvent;
- Classes::TNotifyEvent FOnPreviewEvent;
- TQRPrintSetupEvent FOnPrintSetupEvent;
- Graphics::TMetafile* FPage;
- int FPageCount;
- int FPageNumber;
- bool FPrinterOK;
- int FProgress;
- System::AnsiString FTitle;
- int FTopWaste;
- bool FShowingPreview;
- TQRPrinterStatus FStatus;
- Extended FXFactor;
- Extended FYFactor;
- TQRPageList* PageList;
- bool __fastcall CurrentPageOK(void);
- int __fastcall GetLeftWaste(void);
- TQRBin __fastcall GetBin(void);
- Graphics::TCanvas* __fastcall GetCanvas(void);
- bool __fastcall GetCompression(void);
- int __fastcall GetCopies(void);
- bool __fastcall GetDuplex(void);
- Printers::TPrinterOrientation __fastcall GetOrientation(void);
- int __fastcall GetPaperLength(void);
- TQRPaperSize __fastcall GetPaperSize(void);
- int __fastcall GetPaperWidth(void);
- int __fastcall GetPrinterIndex(void);
- Classes::TStrings* __fastcall GetPrinters(void);
- int __fastcall GetTopWaste(void);
- void __fastcall CreateMetafileCanvas(void);
- void __fastcall CreatePrinterCanvas(void);
- void __fastcall EndMetafileCanvas(void);
- void __fastcall EndPrinterCanvas(void);
- void __fastcall SetAvailablePages(int Value);
- void __fastcall SetBin(TQRBin Value);
- void __fastcall SetCompression(bool Value);
- void __fastcall SetCopies(int Value);
- void __fastcall SetDestination(TQRPrinterDestination Value);
- void __fastcall SetDuplex(bool Value);
- void __fastcall SetOrientation(Printers::TPrinterOrientation Value);
- void __fastcall SetPaperLength(int Value);
- void __fastcall SetPageNumber(int Value);
- void __fastcall SetPaperSize(TQRPaperSize Value);
- void __fastcall SetPaperWidth(int Value);
- void __fastcall SetPrinterIndex(int Value);
- void __fastcall SetProgress(int Value);
- void __fastcall SetShowingPreview(bool Value);
-
- public:
- __fastcall TQRPrinter(void);
- __fastcall virtual ~TQRPrinter(void);
- Graphics::TMetafile* __fastcall GetPage(int Value);
- int __fastcall XPos(Extended Value);
- int __fastcall XSize(Extended Value);
- int __fastcall YPos(Extended Value);
- int __fastcall YSize(Extended Value);
- int __fastcall PaperLengthValue(void);
- int __fastcall PaperWidthValue(void);
- void __fastcall AbortDoc(void);
- void __fastcall BeginDoc(void);
- void __fastcall Cancel(void);
- void __fastcall Cleanup(void);
- void __fastcall EndDoc(void);
- void __fastcall ExportToFilter(TQRExportFilter* aFilter);
- void __fastcall Load(System::AnsiString Filename);
- void __fastcall NewPage(void);
- void __fastcall Preview(void);
- void __fastcall Print(void);
- void __fastcall PrintSetup(void);
- void __fastcall Save(System::AnsiString Filename);
- __property TQRAfterPreviewEvent AfterPreview = {read=FAfterPreviewEvent, write=FAfterPreviewEvent};
-
- __property TQRAfterPrintEvent AfterPrint = {read=FAfterPrintEvent, write=FAfterPrintEvent};
- __property int AvailablePages = {read=FAvailablePages, write=SetAvailablePages, nodefault};
- __property TQRBin OutputBin = {read=GetBin, write=SetBin, nodefault};
- __property bool Cancelled = {read=FCancelled, write=FCancelled, nodefault};
- __property Graphics::TCanvas* Canvas = {read=GetCanvas};
- __property bool Compression = {read=GetCompression, write=SetCompression, nodefault};
- __property int Copies = {read=GetCopies, write=SetCopies, nodefault};
- __property TQRPrinterDestination Destination = {read=FDestination, write=SetDestination, nodefault}
- ;
- __property bool Duplex = {read=GetDuplex, write=SetDuplex, nodefault};
- __property int FirstPage = {read=FFirstPage, write=FFirstPage, nodefault};
- __property int LastPage = {read=FLastpage, write=FLastpage, nodefault};
- __property int LeftWaste = {read=GetLeftWaste, nodefault};
- __property Controls::TWinControl* MessageReceiver = {read=FMessageReceiver, write=FMessageReceiver}
- ;
- __property Printers::TPrinterOrientation Orientation = {read=GetOrientation, write=SetOrientation,
- nodefault};
- __property TQRExportToFilterEvent OnExportToFilter = {read=FOnExportToFilterEvent, write=FOnExportToFilterEvent
- };
- __property TQRGenerateToPrinterEvent OnGenerateToPrinter = {read=FOnGenerateToPrinterEvent, write=FOnGenerateToPrinterEvent
- };
- __property Classes::TNotifyEvent OnPreview = {read=FOnPreviewEvent, write=FOnPreviewEvent};
- __property TQRPrintSetupEvent OnPrintSetup = {read=FOnPrintSetupEvent, write=FOnPrintSetupEvent};
- __property int PaperLength = {read=GetPaperLength, write=SetPaperLength, nodefault};
- __property Graphics::TMetafile* Page = {read=FPage};
- __property int PageCount = {read=FPageCount, write=FPageCount, nodefault};
- __property int PageNumber = {read=FPageNumber, write=SetPageNumber, nodefault};
- __property int PaperWidth = {read=GetPaperWidth, write=SetPaperWidth, nodefault};
- __property TQRPaperSize PaperSize = {read=GetPaperSize, write=SetPaperSize, nodefault};
- __property int PrinterIndex = {read=GetPrinterIndex, write=SetPrinterIndex, nodefault};
- __property bool PrinterOK = {read=FPrinterOK, nodefault};
- __property Classes::TStrings* Printers = {read=GetPrinters};
- __property int Progress = {read=FProgress, write=SetProgress, nodefault};
- __property bool ShowingPreview = {read=FShowingPreview, write=SetShowingPreview, nodefault};
- __property TQRPrinterStatus Status = {read=FStatus, nodefault};
- __property System::AnsiString Title = {read=FTitle, write=FTitle};
- __property int TopWaste = {read=GetTopWaste, nodefault};
- __property Extended XFactor = {read=FXFactor, write=FXFactor};
- __property Extended YFactor = {read=FYFactor, write=FYFactor};
- };
-
- struct TCM_QRPRogressUpdate
- {
- Cardinal Msg;
- Word Position;
- TQRPrinter* QRPrinter;
- } ;
-
- struct TCM_QRPageAvailable
- {
- Cardinal Msg;
- Word PageCount;
- TQRPrinter* QRPrinter;
- } ;
-
- typedef System::TMetaClass*TQRExportFilterClass;
-
- class DELPHICLASS TQRExportFilterLibraryEntry;
- class PASCALIMPLEMENTATION TQRExportFilterLibraryEntry : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- System::TMetaClass*FExportFilterClass;
- System::AnsiString FName;
- System::AnsiString FExtension;
-
- public:
- __property System::TMetaClass* ExportFilterClass = {read=FExportFilterClass, write=FExportFilterClass
- };
- __property System::AnsiString FilterName = {read=FName, write=FName};
- __property System::AnsiString Extension = {read=FExtension, write=FExtension};
- public:
- /* TObject.Create */ __fastcall TQRExportFilterLibraryEntry(void) : System::TObject() { }
- /* TObject.Destroy */ __fastcall virtual ~TQRExportFilterLibraryEntry(void) { }
-
- };
-
- class DELPHICLASS TQRExportFilterLibrary;
- class PASCALIMPLEMENTATION TQRExportFilterLibrary : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- Classes::TList* FFilterList;
-
- protected:
- System::AnsiString __fastcall GetSaveDialogFilter(void);
-
- public:
- __fastcall TQRExportFilterLibrary(void);
- __fastcall virtual ~TQRExportFilterLibrary(void);
- void __fastcall AddFilter(System::TMetaClass* AFilter);
- __property Classes::TList* Filters = {read=FFilterList};
- __property System::AnsiString SaveDialogFilterString = {read=GetSaveDialogFilter};
- };
-
- typedef System::TMetaClass*TQRLibraryItemClass;
-
- class DELPHICLASS TQRLibraryEntry;
- class PASCALIMPLEMENTATION TQRLibraryEntry : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- System::AnsiString FDescription;
- System::AnsiString FData;
- System::TMetaClass*FItem;
- System::AnsiString FName;
- System::AnsiString FVendor;
-
- public:
- __property System::AnsiString Data = {read=FData, write=FData};
- __property System::AnsiString Description = {read=FDescription, write=FDescription};
- __property System::AnsiString Name = {read=FName, write=FName};
- __property System::AnsiString Vendor = {read=FVendor, write=FVendor};
- __property System::TMetaClass* Item = {read=FItem, write=FItem};
- public:
- /* TObject.Create */ __fastcall TQRLibraryEntry(void) : System::TObject() { }
- /* TObject.Destroy */ __fastcall virtual ~TQRLibraryEntry(void) { }
-
- };
-
- class DELPHICLASS TQRLibrary;
- class PASCALIMPLEMENTATION TQRLibrary : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- Classes::TStrings* Entries;
-
- protected:
- virtual TQRLibraryEntry* __fastcall GetEntry(int Index);
-
- public:
- __fastcall TQRLibrary(void);
- __fastcall virtual ~TQRLibrary(void);
- void __fastcall Add(System::TMetaClass* aItem, System::AnsiString AName, System::AnsiString ADescription
- , System::AnsiString AVendor, System::AnsiString AData);
- __property Classes::TStrings* EntryList = {read=Entries, write=Entries};
- __property TQRLibraryEntry* Entry[int Index] = {read=GetEntry};
- };
-
- class DELPHICLASS TQRFunctionLibrary;
- class DELPHICLASS TQREvElement;
- class PASCALIMPLEMENTATION TQRFunctionLibrary : public Qrprntr::TQRLibrary
- {
- typedef Qrprntr::TQRLibrary inherited;
-
- public:
- TQREvElement* __fastcall GetFunction(System::AnsiString Name);
- public:
- /* TQRLibrary.Create */ __fastcall TQRFunctionLibrary(void) : Qrprntr::TQRLibrary() { }
- /* TQRLibrary.Destroy */ __fastcall virtual ~TQRFunctionLibrary(void) { }
-
- };
-
- class DELPHICLASS TQRToolbar;
- class PASCALIMPLEMENTATION TQRToolbar : public Extctrls::TCustomPanel
- {
- typedef Extctrls::TCustomPanel inherited;
-
- private:
- Classes::TComponent* FComponent;
- int FCurrentX;
- bool FCBClickOK;
-
- protected:
- Buttons::TSpeedButton* __fastcall AddButton(System::AnsiString aCaption, System::AnsiString GlyphName
- , System::AnsiString aHint, int aGroup, Classes::TNotifyEvent ClickEvent);
- Stdctrls::TCheckBox* __fastcall AddCheckBox(System::AnsiString aCaption, System::AnsiString aHint,
- Classes::TNotifyEvent ClickEvent);
- void __fastcall AddSpace(void);
- virtual void __fastcall SetComponent(Classes::TComponent* Value);
- void __fastcall EndSetComponent(void);
- __property bool CBClickOK = {read=FCBClickOK, write=FCBClickOK, nodefault};
- __property int CurrentX = {read=FCurrentX, write=FCurrentX, nodefault};
-
- public:
- __fastcall virtual TQRToolbar(Classes::TComponent* AOwner);
- __property Classes::TComponent* Component = {read=FComponent, write=SetComponent};
- public:
- /* TCustomControl.Destroy */ __fastcall virtual ~TQRToolbar(void) { }
-
- public:
- /* TWinControl.CreateParented */ __fastcall TQRToolbar(HWND ParentWindow) : Extctrls::TCustomPanel(
- ParentWindow) { }
-
- };
-
- class DELPHICLASS TQRGauge;
- class PASCALIMPLEMENTATION TQRGauge : public Comctrls::TProgressBar
- {
- typedef Comctrls::TProgressBar inherited;
-
- public:
- __fastcall virtual TQRGauge(Classes::TComponent* AOwner);
- public:
- /* TWinControl.CreateParented */ __fastcall TQRGauge(HWND ParentWindow) : Comctrls::TProgressBar(ParentWindow
- ) { }
- /* TWinControl.Destroy */ __fastcall virtual ~TQRGauge(void) { }
-
- };
-
- enum TQREvOperator { opLess, opLessOrEqual, opGreater, opGreaterOrEqual, opEqual, opUnequal, opPlus,
- opMinus, opOr, opMul, opDiv, opAnd };
-
- enum TQREvResultType { resInt, resDouble, resString, resBool, resError };
-
- struct TQREvResult
- {
-
- TQREvResultType Kind;
- union
- {
- bool booResult;
- System::SmallStringBase<255> strResult;
- double dblResult;
- int intResult;
-
- };
- } ;
-
- class DELPHICLASS TQREvResultClass;
- class PASCALIMPLEMENTATION TQREvResultClass : public System::TObject
- {
- typedef System::TObject inherited;
-
- public:
- TQREvResult EvResult;
- public:
- /* TObject.Create */ __fastcall TQREvResultClass(void) : System::TObject() { }
- /* TObject.Destroy */ __fastcall virtual ~TQREvResultClass(void) { }
-
- };
-
- class DELPHICLASS TQRFiFo;
- class PASCALIMPLEMENTATION TQRFiFo : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- bool FAggreg;
- Classes::TList* FiFo;
- int FNextItem;
-
- public:
- __fastcall TQRFiFo(void);
- __fastcall virtual ~TQRFiFo(void);
- void __fastcall Put(System::TObject* Value);
- void __fastcall Start(void);
- System::TObject* __fastcall Get(void);
- System::TObject* __fastcall GetAndFree(void);
- __property bool Aggreg = {read=FAggreg, write=FAggreg, nodefault};
- };
-
- class PASCALIMPLEMENTATION TQREvElement : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- bool FIsAggreg;
-
- public:
- __fastcall virtual TQREvElement(void);
- virtual TQREvResult __fastcall Value(TQRFiFo* FiFo);
- virtual void __fastcall Reset(void);
- __property bool IsAggreg = {read=FIsAggreg, write=FIsAggreg, nodefault};
- public:
- /* TObject.Destroy */ __fastcall virtual ~TQREvElement(void) { }
-
- };
-
- class DELPHICLASS TQREvElementFunction;
- class PASCALIMPLEMENTATION TQREvElementFunction : public Qrprntr::TQREvElement
- {
- typedef Qrprntr::TQREvElement inherited;
-
- protected:
- Classes::TList* ArgList;
- bool __fastcall ArgumentOK(TQREvElement* Value);
- TQREvResult __fastcall Argument(int Index);
- void __fastcall FreeArguments(void);
- void __fastcall GetArguments(TQRFiFo* FiFo);
- virtual void __fastcall Aggregate(void);
- virtual TQREvResult __fastcall Calculate(void);
-
- public:
- __fastcall virtual TQREvElementFunction(void);
- __fastcall virtual ~TQREvElementFunction(void);
- virtual TQREvResult __fastcall Value(TQRFiFo* FiFo);
- };
-
- typedef System::TMetaClass*TQREvElementFunctionClass;
-
- class DELPHICLASS TQREvElementArgumentEnd;
- class PASCALIMPLEMENTATION TQREvElementArgumentEnd : public Qrprntr::TQREvElement
- {
- typedef Qrprntr::TQREvElement inherited;
-
- public:
- /* TQREvElement.Create */ __fastcall virtual TQREvElementArgumentEnd(void) : Qrprntr::TQREvElement(
- ) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~TQREvElementArgumentEnd(void) { }
-
- };
-
- class DELPHICLASS TQREvElementDataField;
- class PASCALIMPLEMENTATION TQREvElementDataField : public Qrprntr::TQREvElement
- {
- typedef Qrprntr::TQREvElement inherited;
-
- private:
- Db::TDataSet* FDataSet;
- int FFieldNo;
- Db::TField* FField;
-
- public:
- __fastcall virtual TQREvElementDataField(Db::TField* aField);
- virtual TQREvResult __fastcall Value(TQRFiFo* FiFo);
- public:
- /* TQREvElement.Create */ __fastcall virtual TQREvElementDataField(void) : Qrprntr::TQREvElement() { }
-
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~TQREvElementDataField(void) { }
-
- };
-
- class DELPHICLASS TQREvElementError;
- class PASCALIMPLEMENTATION TQREvElementError : public Qrprntr::TQREvElement
- {
- typedef Qrprntr::TQREvElement inherited;
-
- public:
- virtual TQREvResult __fastcall Value(TQRFiFo* FiFo);
- public:
- /* TQREvElement.Create */ __fastcall virtual TQREvElementError(void) : Qrprntr::TQREvElement() { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~TQREvElementError(void) { }
-
- };
-
- class DELPHICLASS TQREvaluator;
- class PASCALIMPLEMENTATION TQREvaluator : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- Classes::TList* FDataSets;
- TQRFiFo* FiFo;
- bool FPrepared;
- TQREvResult __fastcall EvalFunctionExpr(const System::AnsiString strFunc);
- TQREvResult __fastcall EvalSimpleExpr(const System::AnsiString strSimplExpr);
- TQREvResult __fastcall EvalTerm(const System::AnsiString strTermExpr);
- TQREvResult __fastcall EvalFactor(System::AnsiString strFactorExpr);
- TQREvResult __fastcall EvalString(const System::AnsiString strString);
- TQREvResult __fastcall EvalConstant(const System::AnsiString strConstant);
- bool __fastcall GetAggregate(void);
- TQREvResult __fastcall NegateResult(const TQREvResult &Res);
- TQREvResult __fastcall Evaluate(const System::AnsiString strExpr);
- void __fastcall FindDelimiter(System::AnsiString strArg, int &Pos);
- void __fastcall FindOp1(const System::AnsiString strExpr, TQREvOperator &Op, int &Pos, int &Len);
- void __fastcall FindOp2(const System::AnsiString strExpr, TQREvOperator &Op, int &Pos, int &Len);
- void __fastcall FindOp3(const System::AnsiString strExpr, TQREvOperator &Op, int &Pos, int &Len);
- void __fastcall SetAggregate(bool Value);
- void __fastcall TrimString(System::AnsiString &strString);
-
- protected:
- virtual TQREvResult __fastcall EvalFunction(System::AnsiString strFunc, const System::AnsiString strArg
- );
- virtual TQREvResult __fastcall EvalVariable(System::AnsiString strVariable);
- bool __fastcall GetIsAggreg(void);
-
- public:
- __fastcall TQREvaluator(void);
- __fastcall virtual ~TQREvaluator(void);
- TQREvResult __fastcall Calculate(const System::AnsiString StrExpr);
- TQREvResult __fastcall Value(void);
- void __fastcall Prepare(const System::AnsiString StrExpr);
- void __fastcall Reset(void);
- void __fastcall UnPrepare(void);
- __property bool IsAggreg = {read=GetIsAggreg, nodefault};
- __property bool Aggregate = {read=GetAggregate, write=SetAggregate, nodefault};
- __property Classes::TList* DataSets = {read=FDataSets, write=FDataSets};
- __property bool Prepared = {read=FPrepared, write=FPrepared, nodefault};
- };
-
- enum TQRZoomState { qrZoomToFit, qrZoomToWidth, qrZoomOther };
-
- class DELPHICLASS TQRPreviewImage;
- class PASCALIMPLEMENTATION TQRPreviewImage : public Controls::TGraphicControl
- {
- typedef Controls::TGraphicControl inherited;
-
- private:
- TQRPrinter* FQRPrinter;
- int FPageNumber;
- Graphics::TMetafile* aMetaFile;
- bool FImageOK;
- void __fastcall PaintPage(void);
- void __fastcall SetPageNumber(int Value);
-
- public:
- int Zoom;
- __fastcall virtual TQRPreviewImage(Classes::TComponent* AOwner);
- __fastcall virtual ~TQRPreviewImage(void);
- virtual void __fastcall Paint(void);
- __property bool ImageOK = {read=FImageOK, write=FImageOK, nodefault};
- __property int PageNumber = {read=FPageNumber, write=SetPageNumber, nodefault};
- __property TQRPrinter* QRPrinter = {read=FQRPrinter, write=FQRPrinter};
- };
-
- typedef void __fastcall (__closure *TQRProgressUpdateEvent)(System::TObject* Sender, int Progress);
-
- typedef void __fastcall (__closure *TQRPageAvailableEvent)(System::TObject* Sender, int PageNum);
-
- class DELPHICLASS TQRPreview;
- class PASCALIMPLEMENTATION TQRPreview : public Forms::TScrollBox
- {
- typedef Forms::TScrollBox inherited;
-
- private:
- TQRPageAvailableEvent FOnPageAvailableEvent;
- TQRProgressUpdateEvent FOnProgressUpdateEvent;
- TQRPreviewImage* FPreviewImage;
- int FPageNumber;
- TQRPrinter* FQRPrinter;
- int FZoom;
- TQRZoomState FZoomState;
- void __fastcall SetPageNumber(int Value);
- void __fastcall SetZoom(int value);
- void __fastcall Fixvalues(System::TObject* Sender);
- void __fastcall SetQRPrinter(TQRPrinter* Value);
-
- protected:
- MESSAGE void __fastcall CMPageAvailable(TCM_QRPageAvailable &Message);
- MESSAGE void __fastcall CMProgressUpdate(TCM_QRPRogressUpdate &Message);
-
- public:
- __fastcall virtual TQRPreview(Classes::TComponent* aOwner);
- __fastcall virtual ~TQRPreview(void);
- void __fastcall UpdateImage(void);
- void __fastcall UpdateZoom(void);
- void __fastcall ZoomToWidth(void);
- void __fastcall ZoomToFit(void);
- __property TQRPreviewImage* PreviewImage = {read=FPreviewImage};
- __property TQRPrinter* QRPrinter = {read=FQRPrinter, write=SetQRPrinter};
- __property TQRZoomState ZoomState = {read=FZoomState, write=FZoomState, nodefault};
-
- __published:
- __property TQRPageAvailableEvent OnPageAvailable = {read=FOnPageAvailableEvent, write=FOnPageAvailableEvent
- };
- __property TQRProgressUpdateEvent OnProgressUpdate = {read=FOnProgressUpdateEvent, write=FOnProgressUpdateEvent
- };
- __property int PageNumber = {read=FPageNumber, write=SetPageNumber, nodefault};
- __property int Zoom = {read=FZoom, write=SetZoom, nodefault};
- public:
- /* TWinControl.CreateParented */ __fastcall TQRPreview(HWND ParentWindow) : Forms::TScrollBox(ParentWindow
- ) { }
-
- };
-
- class PASCALIMPLEMENTATION TQRExportFilter : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- System::AnsiString FFilename;
- Classes::TComponent* FOwner;
-
- protected:
- virtual System::AnsiString __fastcall GetDescription(void);
- virtual System::AnsiString __fastcall GetExtension(void);
- virtual System::AnsiString __fastcall GetFilterName(void);
- virtual System::AnsiString __fastcall GetVendorName(void);
-
- public:
- __fastcall TQRExportFilter(System::AnsiString Filename);
- virtual void __fastcall Start(int PaperWidth, int PaperHeight, Graphics::TFont* Font);
- virtual void __fastcall EndPage(void);
- virtual void __fastcall Finish(void);
- virtual void __fastcall NewPage(void);
- virtual void __fastcall TextOut(Extended X, Extended Y, Graphics::TFont* Font, Graphics::TColor BGColor
- , Classes::TAlignment Alignment, System::AnsiString Text);
- __property System::AnsiString Description = {read=GetDescription};
- __property System::AnsiString FileExtension = {read=GetExtension};
- __property System::AnsiString Filename = {read=FFilename};
- __property System::AnsiString Name = {read=GetFilterName};
- __property Classes::TComponent* Owner = {read=FOwner, write=FOwner};
- __property System::AnsiString Vendor = {read=GetVendorName};
- public:
- /* TObject.Destroy */ __fastcall virtual ~TQRExportFilter(void) { }
-
- };
-
- class DELPHICLASS TQRPrinterSettings;
- class PASCALIMPLEMENTATION TQRPrinterSettings : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- private:
- int FCopies;
- bool FDuplex;
- TPrinterOrientation FOrientation;
- TQRBin FOutputBin;
- TQRPaperSize FPaperSize;
- int FPrinterIndex;
- System::AnsiString FTitle;
- int FFirstPage;
- int FLastPage;
-
- public:
- __fastcall TQRPrinterSettings(void);
- void __fastcall ApplySettings(TQRPrinter* APrinter);
- __property int Copies = {read=FCopies, write=FCopies, nodefault};
- __property bool Duplex = {read=FDuplex, write=FDuplex, nodefault};
- __property int FirstPage = {read=FFirstPage, write=FFirstPage, nodefault};
- __property int LastPage = {read=FLastPage, write=FLastPage, nodefault};
- __property Printers::TPrinterOrientation Orientation = {read=FOrientation, write=FOrientation, nodefault
- };
- __property TQRBin OutputBin = {read=FOutputBin, write=FOutputBin, nodefault};
- __property TQRPaperSize PaperSize = {read=FPaperSize, write=FPaperSize, nodefault};
- __property int PrinterIndex = {read=FPrinterIndex, write=FPrinterIndex, nodefault};
- __property System::AnsiString Title = {read=FTitle, write=FTitle};
- public:
- /* TPersistent.Destroy */ __fastcall virtual ~TQRPrinterSettings(void) { }
-
- };
-
- typedef void __fastcall (__closure *TQRPreviewEvent)(void);
-
- //-- var, const, procedure ---------------------------------------------------
- #define cQRName "QuickReport 2.0k"
- #define cQRVersion (Byte)(212)
- #define cQRPDefaultExt "QRP"
- #define cQRDefaultExt "QR"
- extern PACKAGE Extended cQRPaperSizeMetrics[26][2];
- extern PACKAGE int cQRPaperTranslate[28];
- extern PACKAGE int cQRBinTranslate[14];
- #define cHandleSize (Byte)(2)
- #define hpFirst (Byte)(1)
- #define hpLast (Byte)(8)
- #define hpNone (Byte)(0)
- #define hpTopLeft (Byte)(1)
- #define hpTop (Byte)(2)
- #define hpTopRight (Byte)(3)
- #define hpLeft (Byte)(4)
- #define hpRight (Byte)(5)
- #define hpBottomLeft (Byte)(6)
- #define hpBottom (Byte)(7)
- #define hpBottomRight (Byte)(8)
- #define cQRCornerSize (Byte)(4)
- #define cQRPageShadowWidth (Byte)(2)
- #define cQRPageFrameWidth (Byte)(1)
- #define cQRPageShadowColor (int)(0)
- #define cQRButtonSize (Byte)(24)
- #define cQRToolbarHeight (Byte)(30)
- #define cQRToolbarMargin (Byte)(4)
- #define cQRToolbarCBWidth (Byte)(80)
- #define cQRToolbarCBMargin (Byte)(8)
- #define MaxChar (Word)(256)
- #define EofChar (Word)(256)
- #define PredMax (Byte)(255)
- #define TwiceMax (Word)(512)
- #define ROOT (Byte)(0)
- extern PACKAGE Byte BitMask[8];
- #define CM_QRPROGRESSUPDATE (Word)(1024)
- #define CM_QRPAGEAVAILABLE (Word)(1025)
- extern PACKAGE TQRExportFilterLibrary* QRExportFilterLibrary;
- extern PACKAGE TQRFunctionLibrary* QRFunctionLibrary;
- extern PACKAGE System::AnsiString __fastcall QRPaperName(TQRPaperSize Size);
- extern PACKAGE System::AnsiString __fastcall QRBandTypeName(TQRBandType BandType);
- extern PACKAGE System::AnsiString __fastcall QRBandComponentName(TQRBandType BandType);
- extern PACKAGE System::AnsiString __fastcall TempFilename(void);
- extern PACKAGE Classes::TStrings* __fastcall GetFonts(void);
- extern PACKAGE void __fastcall RegisterQRFunction(System::TMetaClass* FunctionClass, System::AnsiString
- Name, System::AnsiString Description, System::AnsiString Vendor, System::AnsiString Arguments);
- extern PACKAGE TQRPrinter* __fastcall QRPrinter(void);
-
- } /* namespace Qrprntr */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Qrprntr;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // qrprntr
-